import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import VueCustomeComponents from 'vue-custome-components'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import { createPinia } from 'pinia'
import 'default-passive-events'
import 'element-plus/dist/index.css'
import 'vue-custome-components/dist/style.css'
import './style.css'
import './common.scss'

import router from './router'

import App from './App.vue'

const app = createApp(App)
// 注册ElementPlus
app.use(ElementPlus, { locale: zhCn } )
// 注册 图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
  }
//注册路由 
app.use(router)
// 创建一个 pinia（根存储）并将其传递给应用程序
app.use(createPinia())
app.use(VueCustomeComponents)

app.mount('#app')
